<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  System.IO.Error</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow 2001</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Standard IO Errors.</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">System.IO.Error</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span>    </span><span class="annot"><span class="hs-comment">-- * I\/O errors</span></span><span>
</span><span id="line-21"></span><span>    </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier">IOError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span>    </span><span class="annot"><a href="GHC.IO.Exception.html#userError"><span class="hs-identifier">userError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#mkIOError"><span class="hs-identifier">mkIOError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#annotateIOError"><span class="hs-identifier">annotateIOError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Classifying I\/O errors</span></span><span>
</span><span id="line-30"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isAlreadyExistsError"><span class="hs-identifier">isAlreadyExistsError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isDoesNotExistError"><span class="hs-identifier">isDoesNotExistError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isAlreadyInUseError"><span class="hs-identifier">isAlreadyInUseError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isFullError"><span class="hs-identifier">isFullError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isEOFError"><span class="hs-identifier">isEOFError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isIllegalOperation"><span class="hs-identifier">isIllegalOperation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isPermissionError"><span class="hs-identifier">isPermissionError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isUserError"><span class="hs-identifier">isUserError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isResourceVanishedError"><span class="hs-identifier">isResourceVanishedError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** Attributes of I\/O errors</span></span><span>
</span><span id="line-41"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#ioeGetErrorType"><span class="hs-identifier">ioeGetErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-42"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#ioeGetLocation"><span class="hs-identifier">ioeGetLocation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-43"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#ioeGetErrorString"><span class="hs-identifier">ioeGetErrorString</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-44"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#ioeGetHandle"><span class="hs-identifier">ioeGetHandle</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-45"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#ioeGetFileName"><span class="hs-identifier">ioeGetFileName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#ioeSetErrorType"><span class="hs-identifier">ioeSetErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-48"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#ioeSetErrorString"><span class="hs-identifier">ioeSetErrorString</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-49"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#ioeSetLocation"><span class="hs-identifier">ioeSetLocation</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-50"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#ioeSetHandle"><span class="hs-identifier">ioeSetHandle</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-51"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#ioeSetFileName"><span class="hs-identifier">ioeSetFileName</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Types of I\/O error</span></span><span>
</span><span id="line-54"></span><span>    </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier">IOErrorType</span></a></span><span class="hs-special">,</span><span>                </span><span class="hs-comment">-- abstract</span><span>
</span><span id="line-55"></span><span>
</span><span id="line-56"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#alreadyExistsErrorType"><span class="hs-identifier">alreadyExistsErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-57"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#doesNotExistErrorType"><span class="hs-identifier">doesNotExistErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-58"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#alreadyInUseErrorType"><span class="hs-identifier">alreadyInUseErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-59"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#fullErrorType"><span class="hs-identifier">fullErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-60"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#eofErrorType"><span class="hs-identifier">eofErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-61"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#illegalOperationErrorType"><span class="hs-identifier">illegalOperationErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-62"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#permissionErrorType"><span class="hs-identifier">permissionErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-63"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#userErrorType"><span class="hs-identifier">userErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-64"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#resourceVanishedErrorType"><span class="hs-identifier">resourceVanishedErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span>    </span><span class="annot"><span class="hs-comment">-- ** 'IOErrorType' predicates</span></span><span>
</span><span id="line-67"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isAlreadyExistsErrorType"><span class="hs-identifier">isAlreadyExistsErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-68"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isDoesNotExistErrorType"><span class="hs-identifier">isDoesNotExistErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-69"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isAlreadyInUseErrorType"><span class="hs-identifier">isAlreadyInUseErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-70"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isFullErrorType"><span class="hs-identifier">isFullErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-71"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isEOFErrorType"><span class="hs-identifier">isEOFErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-72"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isIllegalOperationErrorType"><span class="hs-identifier">isIllegalOperationErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-73"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isPermissionErrorType"><span class="hs-identifier">isPermissionErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-74"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isUserErrorType"><span class="hs-identifier">isUserErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-75"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#isResourceVanishedErrorType"><span class="hs-identifier">isResourceVanishedErrorType</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Throwing and catching I\/O errors</span></span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span>    </span><span class="annot"><a href="GHC.IO.Exception.html#ioError"><span class="hs-identifier">ioError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#catchIOError"><span class="hs-identifier">catchIOError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-82"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#tryIOError"><span class="hs-identifier">tryIOError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span>    </span><span class="annot"><a href="System.IO.Error.html#modifyIOError"><span class="hs-identifier">modifyIOError</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-85"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Control.Exception.Base.html"><span class="hs-identifier">Control.Exception.Base</span></a></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Either.html"><span class="hs-identifier">Data.Either</span></a></span><span>
</span><span id="line-90"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Maybe.html"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-91"></span><span>
</span><span id="line-92"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-93"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.IO.html"><span class="hs-identifier">GHC.IO</span></a></span><span>
</span><span id="line-94"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html"><span class="hs-identifier">GHC.IO.Exception</span></a></span><span>
</span><span id="line-95"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.IO.Handle.Types.html"><span class="hs-identifier">GHC.IO.Handle.Types</span></a></span><span>
</span><span id="line-96"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Text.Show.html"><span class="hs-identifier">Text.Show</span></a></span><span>
</span><span id="line-97"></span><span>
</span><span id="line-98"></span><span class="hs-comment">-- | The construct 'tryIOError' @comp@ exposes IO errors which occur within a</span><span>
</span><span id="line-99"></span><span class="hs-comment">-- computation, and which are not fully handled.</span><span>
</span><span id="line-100"></span><span class="hs-comment">--</span><span>
</span><span id="line-101"></span><span class="hs-comment">-- Non-I\/O exceptions are not caught by this variant; to catch all</span><span>
</span><span id="line-102"></span><span class="hs-comment">-- exceptions, use 'Control.Exception.try' from &quot;Control.Exception&quot;.</span><span>
</span><span id="line-103"></span><span class="hs-comment">--</span><span>
</span><span id="line-104"></span><span class="hs-comment">-- @since 4.4.0.0</span><span>
</span><span id="line-105"></span><span id="local-6989586621679543681"><span class="annot"><a href="System.IO.Error.html#tryIOError"><span class="hs-identifier hs-type">tryIOError</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679543681"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679543681"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-106"></span><span id="tryIOError"><span class="annot"><span class="annottext">tryIOError :: forall a. IO a -&gt; IO (Either IOError a)
</span><a href="System.IO.Error.html#tryIOError"><span class="hs-identifier hs-var hs-var">tryIOError</span></a></span></span><span> </span><span id="local-6989586621679543602"><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679543602"><span class="hs-identifier hs-var">f</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">IO (Either IOError a)
-&gt; (IOError -&gt; IO (Either IOError a)) -&gt; IO (Either IOError a)
forall e a. Exception e =&gt; IO a -&gt; (e -&gt; IO a) -&gt; IO a
</span><a href="GHC.IO.html#catch"><span class="hs-identifier hs-var">catch</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679543600"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679543600"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679543602"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-107"></span><span>                            </span><span class="annot"><span class="annottext">Either IOError a -&gt; IO (Either IOError a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Either IOError a
forall a b. b -&gt; Either a b
</span><a href="Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679543600"><span class="hs-identifier hs-var">r</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-108"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Either IOError a -&gt; IO (Either IOError a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Either IOError a -&gt; IO (Either IOError a))
-&gt; (IOError -&gt; Either IOError a)
-&gt; IOError
-&gt; IO (Either IOError a)
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; Either IOError a
forall a b. a -&gt; Either a b
</span><a href="Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-111"></span><span class="hs-comment">-- Constructing an IOError</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="hs-comment">-- | Construct an 'IOError' of the given type where the second argument</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- describes the error location and the third and fourth argument</span><span>
</span><span id="line-115"></span><span class="hs-comment">-- contain the file handle and file path of the file involved in the</span><span>
</span><span id="line-116"></span><span class="hs-comment">-- error if applicable.</span><span>
</span><span id="line-117"></span><span class="annot"><a href="System.IO.Error.html#mkIOError"><span class="hs-identifier hs-type">mkIOError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span>
</span><span id="line-118"></span><span id="mkIOError"><span class="annot"><span class="annottext">mkIOError :: IOErrorType -&gt; String -&gt; Maybe Handle -&gt; Maybe String -&gt; IOError
</span><a href="System.IO.Error.html#mkIOError"><span class="hs-identifier hs-var hs-var">mkIOError</span></a></span></span><span> </span><span id="local-6989586621679543597"><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679543597"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621679543596"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679543596"><span class="hs-identifier hs-var">location</span></a></span></span><span> </span><span id="local-6989586621679543595"><span class="annot"><span class="annottext">Maybe Handle
</span><a href="#local-6989586621679543595"><span class="hs-identifier hs-var">maybe_hdl</span></a></span></span><span> </span><span id="local-6989586621679543594"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679543594"><span class="hs-identifier hs-var">maybe_filename</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-119"></span><span>               </span><span class="annot"><span class="annottext">IOError :: Maybe Handle
-&gt; IOErrorType
-&gt; String
-&gt; String
-&gt; Maybe CInt
-&gt; Maybe String
-&gt; IOError
</span><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ioe_type :: IOErrorType
</span><a href="GHC.IO.Exception.html#ioe_type"><span class="hs-identifier hs-var">ioe_type</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679543597"><span class="hs-identifier hs-var">t</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-120"></span><span>                        </span><span class="annot"><span class="annottext">ioe_location :: String
</span><a href="GHC.IO.Exception.html#ioe_location"><span class="hs-identifier hs-var">ioe_location</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679543596"><span class="hs-identifier hs-var">location</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-121"></span><span>                        </span><span class="annot"><span class="annottext">ioe_description :: String
</span><a href="GHC.IO.Exception.html#ioe_description"><span class="hs-identifier hs-var">ioe_description</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-122"></span><span>                        </span><span class="annot"><span class="annottext">ioe_errno :: Maybe CInt
</span><a href="GHC.IO.Exception.html#ioe_errno"><span class="hs-identifier hs-var">ioe_errno</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe CInt
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-123"></span><span>                        </span><span class="annot"><span class="annottext">ioe_handle :: Maybe Handle
</span><a href="GHC.IO.Exception.html#ioe_handle"><span class="hs-identifier hs-var">ioe_handle</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Handle
</span><a href="#local-6989586621679543595"><span class="hs-identifier hs-var">maybe_hdl</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-124"></span><span>                        </span><span class="annot"><span class="annottext">ioe_filename :: Maybe String
</span><a href="GHC.IO.Exception.html#ioe_filename"><span class="hs-identifier hs-var">ioe_filename</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679543594"><span class="hs-identifier hs-var">maybe_filename</span></a></span><span>
</span><span id="line-125"></span><span>                        </span><span class="hs-special">}</span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-128"></span><span class="hs-comment">-- IOErrorType</span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="hs-comment">-- | An error indicating that an 'IO' operation failed because</span><span>
</span><span id="line-131"></span><span class="hs-comment">-- one of its arguments already exists.</span><span>
</span><span id="line-132"></span><span class="annot"><a href="System.IO.Error.html#isAlreadyExistsError"><span class="hs-identifier hs-type">isAlreadyExistsError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-133"></span><span id="isAlreadyExistsError"><span class="annot"><span class="annottext">isAlreadyExistsError :: IOError -&gt; Bool
</span><a href="System.IO.Error.html#isAlreadyExistsError"><span class="hs-identifier hs-var hs-var">isAlreadyExistsError</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isAlreadyExistsErrorType"><span class="hs-identifier hs-var">isAlreadyExistsErrorType</span></a></span><span>    </span><span class="annot"><span class="annottext">(IOErrorType -&gt; Bool)
-&gt; (IOError -&gt; IOErrorType) -&gt; IOError -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; IOErrorType
</span><a href="System.IO.Error.html#ioeGetErrorType"><span class="hs-identifier hs-var">ioeGetErrorType</span></a></span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span class="hs-comment">-- | An error indicating that an 'IO' operation failed because</span><span>
</span><span id="line-136"></span><span class="hs-comment">-- one of its arguments does not exist.</span><span>
</span><span id="line-137"></span><span class="annot"><a href="System.IO.Error.html#isDoesNotExistError"><span class="hs-identifier hs-type">isDoesNotExistError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-138"></span><span id="isDoesNotExistError"><span class="annot"><span class="annottext">isDoesNotExistError :: IOError -&gt; Bool
</span><a href="System.IO.Error.html#isDoesNotExistError"><span class="hs-identifier hs-var hs-var">isDoesNotExistError</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isDoesNotExistErrorType"><span class="hs-identifier hs-var">isDoesNotExistErrorType</span></a></span><span>     </span><span class="annot"><span class="annottext">(IOErrorType -&gt; Bool)
-&gt; (IOError -&gt; IOErrorType) -&gt; IOError -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; IOErrorType
</span><a href="System.IO.Error.html#ioeGetErrorType"><span class="hs-identifier hs-var">ioeGetErrorType</span></a></span><span>
</span><span id="line-139"></span><span>
</span><span id="line-140"></span><span class="hs-comment">-- | An error indicating that an 'IO' operation failed because</span><span>
</span><span id="line-141"></span><span class="hs-comment">-- one of its arguments is a single-use resource, which is already</span><span>
</span><span id="line-142"></span><span class="hs-comment">-- being used (for example, opening the same file twice for writing</span><span>
</span><span id="line-143"></span><span class="hs-comment">-- might give this error).</span><span>
</span><span id="line-144"></span><span class="annot"><a href="System.IO.Error.html#isAlreadyInUseError"><span class="hs-identifier hs-type">isAlreadyInUseError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-145"></span><span id="isAlreadyInUseError"><span class="annot"><span class="annottext">isAlreadyInUseError :: IOError -&gt; Bool
</span><a href="System.IO.Error.html#isAlreadyInUseError"><span class="hs-identifier hs-var hs-var">isAlreadyInUseError</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isAlreadyInUseErrorType"><span class="hs-identifier hs-var">isAlreadyInUseErrorType</span></a></span><span>     </span><span class="annot"><span class="annottext">(IOErrorType -&gt; Bool)
-&gt; (IOError -&gt; IOErrorType) -&gt; IOError -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; IOErrorType
</span><a href="System.IO.Error.html#ioeGetErrorType"><span class="hs-identifier hs-var">ioeGetErrorType</span></a></span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span class="hs-comment">-- | An error indicating that an 'IO' operation failed because</span><span>
</span><span id="line-148"></span><span class="hs-comment">-- the device is full.</span><span>
</span><span id="line-149"></span><span class="annot"><a href="System.IO.Error.html#isFullError"><span class="hs-identifier hs-type">isFullError</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-150"></span><span id="isFullError"><span class="annot"><span class="annottext">isFullError :: IOError -&gt; Bool
</span><a href="System.IO.Error.html#isFullError"><span class="hs-identifier hs-var hs-var">isFullError</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isFullErrorType"><span class="hs-identifier hs-var">isFullErrorType</span></a></span><span>             </span><span class="annot"><span class="annottext">(IOErrorType -&gt; Bool)
-&gt; (IOError -&gt; IOErrorType) -&gt; IOError -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; IOErrorType
</span><a href="System.IO.Error.html#ioeGetErrorType"><span class="hs-identifier hs-var">ioeGetErrorType</span></a></span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span class="hs-comment">-- | An error indicating that an 'IO' operation failed because</span><span>
</span><span id="line-153"></span><span class="hs-comment">-- the end of file has been reached.</span><span>
</span><span id="line-154"></span><span class="annot"><a href="System.IO.Error.html#isEOFError"><span class="hs-identifier hs-type">isEOFError</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-155"></span><span id="isEOFError"><span class="annot"><span class="annottext">isEOFError :: IOError -&gt; Bool
</span><a href="System.IO.Error.html#isEOFError"><span class="hs-identifier hs-var hs-var">isEOFError</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isEOFErrorType"><span class="hs-identifier hs-var">isEOFErrorType</span></a></span><span>              </span><span class="annot"><span class="annottext">(IOErrorType -&gt; Bool)
-&gt; (IOError -&gt; IOErrorType) -&gt; IOError -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; IOErrorType
</span><a href="System.IO.Error.html#ioeGetErrorType"><span class="hs-identifier hs-var">ioeGetErrorType</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span class="hs-comment">-- | An error indicating that an 'IO' operation failed because</span><span>
</span><span id="line-158"></span><span class="hs-comment">-- the operation was not possible.</span><span>
</span><span id="line-159"></span><span class="hs-comment">-- Any computation which returns an 'IO' result may fail with</span><span>
</span><span id="line-160"></span><span class="hs-comment">-- 'isIllegalOperation'.  In some cases, an implementation will not be</span><span>
</span><span id="line-161"></span><span class="hs-comment">-- able to distinguish between the possible error causes.  In this case</span><span>
</span><span id="line-162"></span><span class="hs-comment">-- it should fail with 'isIllegalOperation'.</span><span>
</span><span id="line-163"></span><span class="annot"><a href="System.IO.Error.html#isIllegalOperation"><span class="hs-identifier hs-type">isIllegalOperation</span></a></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-164"></span><span id="isIllegalOperation"><span class="annot"><span class="annottext">isIllegalOperation :: IOError -&gt; Bool
</span><a href="System.IO.Error.html#isIllegalOperation"><span class="hs-identifier hs-var hs-var">isIllegalOperation</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isIllegalOperationErrorType"><span class="hs-identifier hs-var">isIllegalOperationErrorType</span></a></span><span> </span><span class="annot"><span class="annottext">(IOErrorType -&gt; Bool)
-&gt; (IOError -&gt; IOErrorType) -&gt; IOError -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; IOErrorType
</span><a href="System.IO.Error.html#ioeGetErrorType"><span class="hs-identifier hs-var">ioeGetErrorType</span></a></span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span class="hs-comment">-- | An error indicating that an 'IO' operation failed because</span><span>
</span><span id="line-167"></span><span class="hs-comment">-- the user does not have sufficient operating system privilege</span><span>
</span><span id="line-168"></span><span class="hs-comment">-- to perform that operation.</span><span>
</span><span id="line-169"></span><span class="annot"><a href="System.IO.Error.html#isPermissionError"><span class="hs-identifier hs-type">isPermissionError</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-170"></span><span id="isPermissionError"><span class="annot"><span class="annottext">isPermissionError :: IOError -&gt; Bool
</span><a href="System.IO.Error.html#isPermissionError"><span class="hs-identifier hs-var hs-var">isPermissionError</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isPermissionErrorType"><span class="hs-identifier hs-var">isPermissionErrorType</span></a></span><span>       </span><span class="annot"><span class="annottext">(IOErrorType -&gt; Bool)
-&gt; (IOError -&gt; IOErrorType) -&gt; IOError -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; IOErrorType
</span><a href="System.IO.Error.html#ioeGetErrorType"><span class="hs-identifier hs-var">ioeGetErrorType</span></a></span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span class="hs-comment">-- | A programmer-defined error value constructed using 'userError'.</span><span>
</span><span id="line-173"></span><span class="annot"><a href="System.IO.Error.html#isUserError"><span class="hs-identifier hs-type">isUserError</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-174"></span><span id="isUserError"><span class="annot"><span class="annottext">isUserError :: IOError -&gt; Bool
</span><a href="System.IO.Error.html#isUserError"><span class="hs-identifier hs-var hs-var">isUserError</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isUserErrorType"><span class="hs-identifier hs-var">isUserErrorType</span></a></span><span>             </span><span class="annot"><span class="annottext">(IOErrorType -&gt; Bool)
-&gt; (IOError -&gt; IOErrorType) -&gt; IOError -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; IOErrorType
</span><a href="System.IO.Error.html#ioeGetErrorType"><span class="hs-identifier hs-var">ioeGetErrorType</span></a></span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span class="hs-comment">-- | An error indicating that the operation failed because the</span><span>
</span><span id="line-177"></span><span class="hs-comment">-- resource vanished. See 'resourceVanishedErrorType'.</span><span>
</span><span id="line-178"></span><span class="hs-comment">--</span><span>
</span><span id="line-179"></span><span class="hs-comment">-- @since 4.14.0.0</span><span>
</span><span id="line-180"></span><span class="annot"><a href="System.IO.Error.html#isResourceVanishedError"><span class="hs-identifier hs-type">isResourceVanishedError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-181"></span><span id="isResourceVanishedError"><span class="annot"><span class="annottext">isResourceVanishedError :: IOError -&gt; Bool
</span><a href="System.IO.Error.html#isResourceVanishedError"><span class="hs-identifier hs-var hs-var">isResourceVanishedError</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isResourceVanishedErrorType"><span class="hs-identifier hs-var">isResourceVanishedErrorType</span></a></span><span> </span><span class="annot"><span class="annottext">(IOErrorType -&gt; Bool)
-&gt; (IOError -&gt; IOErrorType) -&gt; IOError -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; IOErrorType
</span><a href="System.IO.Error.html#ioeGetErrorType"><span class="hs-identifier hs-var">ioeGetErrorType</span></a></span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-184"></span><span class="hs-comment">-- IOErrorTypes</span><span>
</span><span id="line-185"></span><span>
</span><span id="line-186"></span><span class="hs-comment">-- | I\/O error where the operation failed because one of its arguments</span><span>
</span><span id="line-187"></span><span class="hs-comment">-- already exists.</span><span>
</span><span id="line-188"></span><span class="annot"><a href="System.IO.Error.html#alreadyExistsErrorType"><span class="hs-identifier hs-type">alreadyExistsErrorType</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span>
</span><span id="line-189"></span><span id="alreadyExistsErrorType"><span class="annot"><span class="annottext">alreadyExistsErrorType :: IOErrorType
</span><a href="System.IO.Error.html#alreadyExistsErrorType"><span class="hs-identifier hs-var hs-var">alreadyExistsErrorType</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#AlreadyExists"><span class="hs-identifier hs-var">AlreadyExists</span></a></span><span>
</span><span id="line-190"></span><span>
</span><span id="line-191"></span><span class="hs-comment">-- | I\/O error where the operation failed because one of its arguments</span><span>
</span><span id="line-192"></span><span class="hs-comment">-- does not exist.</span><span>
</span><span id="line-193"></span><span class="annot"><a href="System.IO.Error.html#doesNotExistErrorType"><span class="hs-identifier hs-type">doesNotExistErrorType</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span>
</span><span id="line-194"></span><span id="doesNotExistErrorType"><span class="annot"><span class="annottext">doesNotExistErrorType :: IOErrorType
</span><a href="System.IO.Error.html#doesNotExistErrorType"><span class="hs-identifier hs-var hs-var">doesNotExistErrorType</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#NoSuchThing"><span class="hs-identifier hs-var">NoSuchThing</span></a></span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span class="hs-comment">-- | I\/O error where the operation failed because one of its arguments</span><span>
</span><span id="line-197"></span><span class="hs-comment">-- is a single-use resource, which is already being used.</span><span>
</span><span id="line-198"></span><span class="annot"><a href="System.IO.Error.html#alreadyInUseErrorType"><span class="hs-identifier hs-type">alreadyInUseErrorType</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span>
</span><span id="line-199"></span><span id="alreadyInUseErrorType"><span class="annot"><span class="annottext">alreadyInUseErrorType :: IOErrorType
</span><a href="System.IO.Error.html#alreadyInUseErrorType"><span class="hs-identifier hs-var hs-var">alreadyInUseErrorType</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#ResourceBusy"><span class="hs-identifier hs-var">ResourceBusy</span></a></span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span class="hs-comment">-- | I\/O error where the operation failed because the device is full.</span><span>
</span><span id="line-202"></span><span class="annot"><a href="System.IO.Error.html#fullErrorType"><span class="hs-identifier hs-type">fullErrorType</span></a></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span>
</span><span id="line-203"></span><span id="fullErrorType"><span class="annot"><span class="annottext">fullErrorType :: IOErrorType
</span><a href="System.IO.Error.html#fullErrorType"><span class="hs-identifier hs-var hs-var">fullErrorType</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#ResourceExhausted"><span class="hs-identifier hs-var">ResourceExhausted</span></a></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span class="hs-comment">-- | I\/O error where the operation failed because the end of file has</span><span>
</span><span id="line-206"></span><span class="hs-comment">-- been reached.</span><span>
</span><span id="line-207"></span><span class="annot"><a href="System.IO.Error.html#eofErrorType"><span class="hs-identifier hs-type">eofErrorType</span></a></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span>
</span><span id="line-208"></span><span id="eofErrorType"><span class="annot"><span class="annottext">eofErrorType :: IOErrorType
</span><a href="System.IO.Error.html#eofErrorType"><span class="hs-identifier hs-var hs-var">eofErrorType</span></a></span></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#EOF"><span class="hs-identifier hs-var">EOF</span></a></span><span>
</span><span id="line-209"></span><span>
</span><span id="line-210"></span><span class="hs-comment">-- | I\/O error where the operation is not possible.</span><span>
</span><span id="line-211"></span><span class="annot"><a href="System.IO.Error.html#illegalOperationErrorType"><span class="hs-identifier hs-type">illegalOperationErrorType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span>
</span><span id="line-212"></span><span id="illegalOperationErrorType"><span class="annot"><span class="annottext">illegalOperationErrorType :: IOErrorType
</span><a href="System.IO.Error.html#illegalOperationErrorType"><span class="hs-identifier hs-var hs-var">illegalOperationErrorType</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#IllegalOperation"><span class="hs-identifier hs-var">IllegalOperation</span></a></span><span>
</span><span id="line-213"></span><span>
</span><span id="line-214"></span><span class="hs-comment">-- | I\/O error where the operation failed because the user does not</span><span>
</span><span id="line-215"></span><span class="hs-comment">-- have sufficient operating system privilege to perform that operation.</span><span>
</span><span id="line-216"></span><span class="annot"><a href="System.IO.Error.html#permissionErrorType"><span class="hs-identifier hs-type">permissionErrorType</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span>
</span><span id="line-217"></span><span id="permissionErrorType"><span class="annot"><span class="annottext">permissionErrorType :: IOErrorType
</span><a href="System.IO.Error.html#permissionErrorType"><span class="hs-identifier hs-var hs-var">permissionErrorType</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#PermissionDenied"><span class="hs-identifier hs-var">PermissionDenied</span></a></span><span>
</span><span id="line-218"></span><span>
</span><span id="line-219"></span><span class="hs-comment">-- | I\/O error that is programmer-defined.</span><span>
</span><span id="line-220"></span><span class="annot"><a href="System.IO.Error.html#userErrorType"><span class="hs-identifier hs-type">userErrorType</span></a></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span>
</span><span id="line-221"></span><span id="userErrorType"><span class="annot"><span class="annottext">userErrorType :: IOErrorType
</span><a href="System.IO.Error.html#userErrorType"><span class="hs-identifier hs-var hs-var">userErrorType</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#UserError"><span class="hs-identifier hs-var">UserError</span></a></span><span>
</span><span id="line-222"></span><span>
</span><span id="line-223"></span><span class="hs-comment">-- | I\/O error where the operation failed because the resource vanished.</span><span>
</span><span id="line-224"></span><span class="hs-comment">-- This happens when, for example, attempting to write to a closed</span><span>
</span><span id="line-225"></span><span class="hs-comment">-- socket or attempting to write to a named pipe that was deleted.</span><span>
</span><span id="line-226"></span><span class="hs-comment">--</span><span>
</span><span id="line-227"></span><span class="hs-comment">-- @since 4.14.0.0</span><span>
</span><span id="line-228"></span><span class="annot"><a href="System.IO.Error.html#resourceVanishedErrorType"><span class="hs-identifier hs-type">resourceVanishedErrorType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span>
</span><span id="line-229"></span><span id="resourceVanishedErrorType"><span class="annot"><span class="annottext">resourceVanishedErrorType :: IOErrorType
</span><a href="System.IO.Error.html#resourceVanishedErrorType"><span class="hs-identifier hs-var hs-var">resourceVanishedErrorType</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#ResourceVanished"><span class="hs-identifier hs-var">ResourceVanished</span></a></span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-232"></span><span class="hs-comment">-- IOErrorType predicates</span><span>
</span><span id="line-233"></span><span>
</span><span id="line-234"></span><span class="hs-comment">-- | I\/O error where the operation failed because one of its arguments</span><span>
</span><span id="line-235"></span><span class="hs-comment">-- already exists.</span><span>
</span><span id="line-236"></span><span class="annot"><a href="System.IO.Error.html#isAlreadyExistsErrorType"><span class="hs-identifier hs-type">isAlreadyExistsErrorType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-237"></span><span id="isAlreadyExistsErrorType"><span class="annot"><span class="annottext">isAlreadyExistsErrorType :: IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isAlreadyExistsErrorType"><span class="hs-identifier hs-var hs-var">isAlreadyExistsErrorType</span></a></span></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#AlreadyExists"><span class="hs-identifier hs-var">AlreadyExists</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-238"></span><span class="annot"><a href="System.IO.Error.html#isAlreadyExistsErrorType"><span class="hs-identifier hs-var">isAlreadyExistsErrorType</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-239"></span><span>
</span><span id="line-240"></span><span class="hs-comment">-- | I\/O error where the operation failed because one of its arguments</span><span>
</span><span id="line-241"></span><span class="hs-comment">-- does not exist.</span><span>
</span><span id="line-242"></span><span class="annot"><a href="System.IO.Error.html#isDoesNotExistErrorType"><span class="hs-identifier hs-type">isDoesNotExistErrorType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-243"></span><span id="isDoesNotExistErrorType"><span class="annot"><span class="annottext">isDoesNotExistErrorType :: IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isDoesNotExistErrorType"><span class="hs-identifier hs-var hs-var">isDoesNotExistErrorType</span></a></span></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#NoSuchThing"><span class="hs-identifier hs-var">NoSuchThing</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-244"></span><span class="annot"><a href="System.IO.Error.html#isDoesNotExistErrorType"><span class="hs-identifier hs-var">isDoesNotExistErrorType</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span class="hs-comment">-- | I\/O error where the operation failed because one of its arguments</span><span>
</span><span id="line-247"></span><span class="hs-comment">-- is a single-use resource, which is already being used.</span><span>
</span><span id="line-248"></span><span class="annot"><a href="System.IO.Error.html#isAlreadyInUseErrorType"><span class="hs-identifier hs-type">isAlreadyInUseErrorType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-249"></span><span id="isAlreadyInUseErrorType"><span class="annot"><span class="annottext">isAlreadyInUseErrorType :: IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isAlreadyInUseErrorType"><span class="hs-identifier hs-var hs-var">isAlreadyInUseErrorType</span></a></span></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#ResourceBusy"><span class="hs-identifier hs-var">ResourceBusy</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-250"></span><span class="annot"><a href="System.IO.Error.html#isAlreadyInUseErrorType"><span class="hs-identifier hs-var">isAlreadyInUseErrorType</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-251"></span><span>
</span><span id="line-252"></span><span class="hs-comment">-- | I\/O error where the operation failed because the device is full.</span><span>
</span><span id="line-253"></span><span class="annot"><a href="System.IO.Error.html#isFullErrorType"><span class="hs-identifier hs-type">isFullErrorType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-254"></span><span id="isFullErrorType"><span class="annot"><span class="annottext">isFullErrorType :: IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isFullErrorType"><span class="hs-identifier hs-var hs-var">isFullErrorType</span></a></span></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#ResourceExhausted"><span class="hs-identifier hs-var">ResourceExhausted</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-255"></span><span class="annot"><a href="System.IO.Error.html#isFullErrorType"><span class="hs-identifier hs-var">isFullErrorType</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-256"></span><span>
</span><span id="line-257"></span><span class="hs-comment">-- | I\/O error where the operation failed because the end of file has</span><span>
</span><span id="line-258"></span><span class="hs-comment">-- been reached.</span><span>
</span><span id="line-259"></span><span class="annot"><a href="System.IO.Error.html#isEOFErrorType"><span class="hs-identifier hs-type">isEOFErrorType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-260"></span><span id="isEOFErrorType"><span class="annot"><span class="annottext">isEOFErrorType :: IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isEOFErrorType"><span class="hs-identifier hs-var hs-var">isEOFErrorType</span></a></span></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#EOF"><span class="hs-identifier hs-var">EOF</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-261"></span><span class="annot"><a href="System.IO.Error.html#isEOFErrorType"><span class="hs-identifier hs-var">isEOFErrorType</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-262"></span><span>
</span><span id="line-263"></span><span class="hs-comment">-- | I\/O error where the operation is not possible.</span><span>
</span><span id="line-264"></span><span class="annot"><a href="System.IO.Error.html#isIllegalOperationErrorType"><span class="hs-identifier hs-type">isIllegalOperationErrorType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-265"></span><span id="isIllegalOperationErrorType"><span class="annot"><span class="annottext">isIllegalOperationErrorType :: IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isIllegalOperationErrorType"><span class="hs-identifier hs-var hs-var">isIllegalOperationErrorType</span></a></span></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#IllegalOperation"><span class="hs-identifier hs-var">IllegalOperation</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-266"></span><span class="annot"><a href="System.IO.Error.html#isIllegalOperationErrorType"><span class="hs-identifier hs-var">isIllegalOperationErrorType</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-267"></span><span>
</span><span id="line-268"></span><span class="hs-comment">-- | I\/O error where the operation failed because the user does not</span><span>
</span><span id="line-269"></span><span class="hs-comment">-- have sufficient operating system privilege to perform that operation.</span><span>
</span><span id="line-270"></span><span class="annot"><a href="System.IO.Error.html#isPermissionErrorType"><span class="hs-identifier hs-type">isPermissionErrorType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-271"></span><span id="isPermissionErrorType"><span class="annot"><span class="annottext">isPermissionErrorType :: IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isPermissionErrorType"><span class="hs-identifier hs-var hs-var">isPermissionErrorType</span></a></span></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#PermissionDenied"><span class="hs-identifier hs-var">PermissionDenied</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-272"></span><span class="annot"><a href="System.IO.Error.html#isPermissionErrorType"><span class="hs-identifier hs-var">isPermissionErrorType</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-273"></span><span>
</span><span id="line-274"></span><span class="hs-comment">-- | I\/O error that is programmer-defined.</span><span>
</span><span id="line-275"></span><span class="annot"><a href="System.IO.Error.html#isUserErrorType"><span class="hs-identifier hs-type">isUserErrorType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-276"></span><span id="isUserErrorType"><span class="annot"><span class="annottext">isUserErrorType :: IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isUserErrorType"><span class="hs-identifier hs-var hs-var">isUserErrorType</span></a></span></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#UserError"><span class="hs-identifier hs-var">UserError</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-277"></span><span class="annot"><a href="System.IO.Error.html#isUserErrorType"><span class="hs-identifier hs-var">isUserErrorType</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-278"></span><span>
</span><span id="line-279"></span><span class="hs-comment">-- | I\/O error where the operation failed because the resource vanished.</span><span>
</span><span id="line-280"></span><span class="hs-comment">-- See 'resourceVanishedErrorType'.</span><span>
</span><span id="line-281"></span><span class="hs-comment">--</span><span>
</span><span id="line-282"></span><span class="hs-comment">-- @since 4.14.0.0</span><span>
</span><span id="line-283"></span><span class="annot"><a href="System.IO.Error.html#isResourceVanishedErrorType"><span class="hs-identifier hs-type">isResourceVanishedErrorType</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-284"></span><span id="isResourceVanishedErrorType"><span class="annot"><span class="annottext">isResourceVanishedErrorType :: IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isResourceVanishedErrorType"><span class="hs-identifier hs-var hs-var">isResourceVanishedErrorType</span></a></span></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="GHC.IO.Exception.html#ResourceVanished"><span class="hs-identifier hs-var">ResourceVanished</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-285"></span><span class="annot"><a href="System.IO.Error.html#isResourceVanishedErrorType"><span class="hs-identifier hs-var">isResourceVanishedErrorType</span></a></span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-286"></span><span>
</span><span id="line-287"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-288"></span><span class="hs-comment">-- Miscellaneous</span><span>
</span><span id="line-289"></span><span>
</span><span id="line-290"></span><span class="annot"><a href="System.IO.Error.html#ioeGetErrorType"><span class="hs-identifier hs-type">ioeGetErrorType</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span>
</span><span id="line-291"></span><span class="annot"><a href="System.IO.Error.html#ioeGetErrorString"><span class="hs-identifier hs-type">ioeGetErrorString</span></a></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-292"></span><span class="annot"><a href="System.IO.Error.html#ioeGetLocation"><span class="hs-identifier hs-type">ioeGetLocation</span></a></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-293"></span><span class="annot"><a href="System.IO.Error.html#ioeGetHandle"><span class="hs-identifier hs-type">ioeGetHandle</span></a></span><span>          </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span>
</span><span id="line-294"></span><span class="annot"><a href="System.IO.Error.html#ioeGetFileName"><span class="hs-identifier hs-type">ioeGetFileName</span></a></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-295"></span><span>
</span><span id="line-296"></span><span id="ioeGetErrorType"><span class="annot"><span class="annottext">ioeGetErrorType :: IOError -&gt; IOErrorType
</span><a href="System.IO.Error.html#ioeGetErrorType"><span class="hs-identifier hs-var hs-var">ioeGetErrorType</span></a></span></span><span> </span><span id="local-6989586621679543577"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543577"><span class="hs-identifier hs-var">ioe</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOError -&gt; IOErrorType
</span><a href="GHC.IO.Exception.html#ioe_type"><span class="hs-identifier hs-var hs-var">ioe_type</span></a></span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543577"><span class="hs-identifier hs-var">ioe</span></a></span><span>
</span><span id="line-297"></span><span>
</span><span id="line-298"></span><span id="ioeGetErrorString"><span class="annot"><span class="annottext">ioeGetErrorString :: IOError -&gt; String
</span><a href="System.IO.Error.html#ioeGetErrorString"><span class="hs-identifier hs-var hs-var">ioeGetErrorString</span></a></span></span><span> </span><span id="local-6989586621679543576"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543576"><span class="hs-identifier hs-var">ioe</span></a></span></span><span>
</span><span id="line-299"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">IOErrorType -&gt; Bool
</span><a href="System.IO.Error.html#isUserErrorType"><span class="hs-identifier hs-var">isUserErrorType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IOError -&gt; IOErrorType
</span><a href="GHC.IO.Exception.html#ioe_type"><span class="hs-identifier hs-var hs-var">ioe_type</span></a></span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543576"><span class="hs-identifier hs-var">ioe</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOError -&gt; String
</span><a href="GHC.IO.Exception.html#ioe_description"><span class="hs-identifier hs-var hs-var">ioe_description</span></a></span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543576"><span class="hs-identifier hs-var">ioe</span></a></span><span>
</span><span id="line-300"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IOError -&gt; IOErrorType
</span><a href="GHC.IO.Exception.html#ioe_type"><span class="hs-identifier hs-var hs-var">ioe_type</span></a></span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543576"><span class="hs-identifier hs-var">ioe</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-301"></span><span>
</span><span id="line-302"></span><span id="ioeGetLocation"><span class="annot"><span class="annottext">ioeGetLocation :: IOError -&gt; String
</span><a href="System.IO.Error.html#ioeGetLocation"><span class="hs-identifier hs-var hs-var">ioeGetLocation</span></a></span></span><span> </span><span id="local-6989586621679543574"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543574"><span class="hs-identifier hs-var">ioe</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOError -&gt; String
</span><a href="GHC.IO.Exception.html#ioe_location"><span class="hs-identifier hs-var hs-var">ioe_location</span></a></span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543574"><span class="hs-identifier hs-var">ioe</span></a></span><span>
</span><span id="line-303"></span><span>
</span><span id="line-304"></span><span id="ioeGetHandle"><span class="annot"><span class="annottext">ioeGetHandle :: IOError -&gt; Maybe Handle
</span><a href="System.IO.Error.html#ioeGetHandle"><span class="hs-identifier hs-var hs-var">ioeGetHandle</span></a></span></span><span> </span><span id="local-6989586621679543573"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543573"><span class="hs-identifier hs-var">ioe</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOError -&gt; Maybe Handle
</span><a href="GHC.IO.Exception.html#ioe_handle"><span class="hs-identifier hs-var hs-var">ioe_handle</span></a></span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543573"><span class="hs-identifier hs-var">ioe</span></a></span><span>
</span><span id="line-305"></span><span>
</span><span id="line-306"></span><span id="ioeGetFileName"><span class="annot"><span class="annottext">ioeGetFileName :: IOError -&gt; Maybe String
</span><a href="System.IO.Error.html#ioeGetFileName"><span class="hs-identifier hs-var hs-var">ioeGetFileName</span></a></span></span><span> </span><span id="local-6989586621679543572"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543572"><span class="hs-identifier hs-var">ioe</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOError -&gt; Maybe String
</span><a href="GHC.IO.Exception.html#ioe_filename"><span class="hs-identifier hs-var hs-var">ioe_filename</span></a></span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543572"><span class="hs-identifier hs-var">ioe</span></a></span><span>
</span><span id="line-307"></span><span>
</span><span id="line-308"></span><span class="annot"><a href="System.IO.Error.html#ioeSetErrorType"><span class="hs-identifier hs-type">ioeSetErrorType</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOErrorType"><span class="hs-identifier hs-type">IOErrorType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span>
</span><span id="line-309"></span><span class="annot"><a href="System.IO.Error.html#ioeSetErrorString"><span class="hs-identifier hs-type">ioeSetErrorString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span>
</span><span id="line-310"></span><span class="annot"><a href="System.IO.Error.html#ioeSetLocation"><span class="hs-identifier hs-type">ioeSetLocation</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span>
</span><span id="line-311"></span><span class="annot"><a href="System.IO.Error.html#ioeSetHandle"><span class="hs-identifier hs-type">ioeSetHandle</span></a></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span>
</span><span id="line-312"></span><span class="annot"><a href="System.IO.Error.html#ioeSetFileName"><span class="hs-identifier hs-type">ioeSetFileName</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span>
</span><span id="line-313"></span><span>
</span><span id="line-314"></span><span id="ioeSetErrorType"><span class="annot"><span class="annottext">ioeSetErrorType :: IOError -&gt; IOErrorType -&gt; IOError
</span><a href="System.IO.Error.html#ioeSetErrorType"><span class="hs-identifier hs-var hs-var">ioeSetErrorType</span></a></span></span><span>   </span><span id="local-6989586621679543571"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543571"><span class="hs-identifier hs-var">ioe</span></a></span></span><span> </span><span id="local-6989586621679543570"><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679543570"><span class="hs-identifier hs-var">errtype</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543571"><span class="hs-identifier hs-var">ioe</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ioe_type :: IOErrorType
</span><a href="GHC.IO.Exception.html#ioe_type"><span class="hs-identifier hs-var">ioe_type</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOErrorType
</span><a href="#local-6989586621679543570"><span class="hs-identifier hs-var">errtype</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-315"></span><span id="ioeSetErrorString"><span class="annot"><span class="annottext">ioeSetErrorString :: IOError -&gt; String -&gt; IOError
</span><a href="System.IO.Error.html#ioeSetErrorString"><span class="hs-identifier hs-var hs-var">ioeSetErrorString</span></a></span></span><span> </span><span id="local-6989586621679543569"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543569"><span class="hs-identifier hs-var">ioe</span></a></span></span><span> </span><span id="local-6989586621679543568"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679543568"><span class="hs-identifier hs-var">str</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543569"><span class="hs-identifier hs-var">ioe</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ioe_description :: String
</span><a href="GHC.IO.Exception.html#ioe_description"><span class="hs-identifier hs-var">ioe_description</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679543568"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-316"></span><span id="ioeSetLocation"><span class="annot"><span class="annottext">ioeSetLocation :: IOError -&gt; String -&gt; IOError
</span><a href="System.IO.Error.html#ioeSetLocation"><span class="hs-identifier hs-var hs-var">ioeSetLocation</span></a></span></span><span>    </span><span id="local-6989586621679543567"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543567"><span class="hs-identifier hs-var">ioe</span></a></span></span><span> </span><span id="local-6989586621679543566"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679543566"><span class="hs-identifier hs-var">str</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543567"><span class="hs-identifier hs-var">ioe</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ioe_location :: String
</span><a href="GHC.IO.Exception.html#ioe_location"><span class="hs-identifier hs-var">ioe_location</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679543566"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-317"></span><span id="ioeSetHandle"><span class="annot"><span class="annottext">ioeSetHandle :: IOError -&gt; Handle -&gt; IOError
</span><a href="System.IO.Error.html#ioeSetHandle"><span class="hs-identifier hs-var hs-var">ioeSetHandle</span></a></span></span><span>      </span><span id="local-6989586621679543565"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543565"><span class="hs-identifier hs-var">ioe</span></a></span></span><span> </span><span id="local-6989586621679543564"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679543564"><span class="hs-identifier hs-var">hdl</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543565"><span class="hs-identifier hs-var">ioe</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ioe_handle :: Maybe Handle
</span><a href="GHC.IO.Exception.html#ioe_handle"><span class="hs-identifier hs-var">ioe_handle</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; Maybe Handle
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621679543564"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-318"></span><span id="ioeSetFileName"><span class="annot"><span class="annottext">ioeSetFileName :: IOError -&gt; String -&gt; IOError
</span><a href="System.IO.Error.html#ioeSetFileName"><span class="hs-identifier hs-var hs-var">ioeSetFileName</span></a></span></span><span>    </span><span id="local-6989586621679543563"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543563"><span class="hs-identifier hs-var">ioe</span></a></span></span><span> </span><span id="local-6989586621679543562"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679543562"><span class="hs-identifier hs-var">filename</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543563"><span class="hs-identifier hs-var">ioe</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ioe_filename :: Maybe String
</span><a href="GHC.IO.Exception.html#ioe_filename"><span class="hs-identifier hs-var">ioe_filename</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679543562"><span class="hs-identifier hs-var">filename</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-319"></span><span>
</span><span id="line-320"></span><span class="hs-comment">-- | Catch any 'IOError' that occurs in the computation and throw a</span><span>
</span><span id="line-321"></span><span class="hs-comment">-- modified version.</span><span>
</span><span id="line-322"></span><span id="local-6989586621679543664"><span class="annot"><a href="System.IO.Error.html#modifyIOError"><span class="hs-identifier hs-type">modifyIOError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679543664"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679543664"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-323"></span><span id="modifyIOError"><span class="annot"><span class="annottext">modifyIOError :: forall a. (IOError -&gt; IOError) -&gt; IO a -&gt; IO a
</span><a href="System.IO.Error.html#modifyIOError"><span class="hs-identifier hs-var hs-var">modifyIOError</span></a></span></span><span> </span><span id="local-6989586621679543560"><span class="annot"><span class="annottext">IOError -&gt; IOError
</span><a href="#local-6989586621679543560"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679543559"><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679543559"><span class="hs-identifier hs-var">io</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO a -&gt; (IOError -&gt; IO a) -&gt; IO a
forall e a. Exception e =&gt; IO a -&gt; (e -&gt; IO a) -&gt; IO a
</span><a href="GHC.IO.html#catch"><span class="hs-identifier hs-var">catch</span></a></span><span> </span><span class="annot"><span class="annottext">IO a
</span><a href="#local-6989586621679543559"><span class="hs-identifier hs-var">io</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679543558"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543558"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">IOError -&gt; IO a
forall a. IOError -&gt; IO a
</span><a href="GHC.IO.Exception.html#ioError"><span class="hs-identifier hs-var">ioError</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IOError -&gt; IOError
</span><a href="#local-6989586621679543560"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543558"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-324"></span><span>
</span><span id="line-325"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-326"></span><span class="hs-comment">-- annotating an IOError</span><span>
</span><span id="line-327"></span><span>
</span><span id="line-328"></span><span class="hs-comment">-- | Adds a location description and maybe a file path and file handle</span><span>
</span><span id="line-329"></span><span class="hs-comment">-- to an 'IOError'.  If any of the file handle or file path is not given</span><span>
</span><span id="line-330"></span><span class="hs-comment">-- the corresponding value in the 'IOError' remains unaltered.</span><span>
</span><span id="line-331"></span><span class="annot"><a href="System.IO.Error.html#annotateIOError"><span class="hs-identifier hs-type">annotateIOError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span>
</span><span id="line-332"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-333"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.IO.Handle.Types.html#Handle"><span class="hs-identifier hs-type">Handle</span></a></span><span>
</span><span id="line-334"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-335"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span>
</span><span id="line-336"></span><span id="annotateIOError"><span class="annot"><span class="annottext">annotateIOError :: IOError -&gt; String -&gt; Maybe Handle -&gt; Maybe String -&gt; IOError
</span><a href="System.IO.Error.html#annotateIOError"><span class="hs-identifier hs-var hs-var">annotateIOError</span></a></span></span><span> </span><span id="local-6989586621679543557"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543557"><span class="hs-identifier hs-var">ioe</span></a></span></span><span> </span><span id="local-6989586621679543556"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679543556"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span id="local-6989586621679543555"><span class="annot"><span class="annottext">Maybe Handle
</span><a href="#local-6989586621679543555"><span class="hs-identifier hs-var">hdl</span></a></span></span><span> </span><span id="local-6989586621679543554"><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679543554"><span class="hs-identifier hs-var">path</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-337"></span><span>  </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543557"><span class="hs-identifier hs-var">ioe</span></a></span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ioe_handle :: Maybe Handle
</span><a href="GHC.IO.Exception.html#ioe_handle"><span class="hs-identifier hs-var">ioe_handle</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Handle
</span><a href="#local-6989586621679543555"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Handle -&gt; Maybe Handle -&gt; Maybe Handle
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a -&gt; m a -&gt; m a
</span><a href="GHC.Base.html#mplus"><span class="hs-operator hs-var">`mplus`</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; Maybe Handle
</span><a href="GHC.IO.Exception.html#ioe_handle"><span class="hs-identifier hs-var hs-var">ioe_handle</span></a></span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543557"><span class="hs-identifier hs-var">ioe</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-338"></span><span>       </span><span class="annot"><span class="annottext">ioe_location :: String
</span><a href="GHC.IO.Exception.html#ioe_location"><span class="hs-identifier hs-var">ioe_location</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679543556"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ioe_filename :: Maybe String
</span><a href="GHC.IO.Exception.html#ioe_filename"><span class="hs-identifier hs-var">ioe_filename</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679543554"><span class="hs-identifier hs-var">path</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; Maybe String -&gt; Maybe String
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a -&gt; m a -&gt; m a
</span><a href="GHC.Base.html#mplus"><span class="hs-operator hs-var">`mplus`</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; Maybe String
</span><a href="GHC.IO.Exception.html#ioe_filename"><span class="hs-identifier hs-var hs-var">ioe_filename</span></a></span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679543557"><span class="hs-identifier hs-var">ioe</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-339"></span><span>
</span><span id="line-340"></span><span class="hs-comment">-- | The 'catchIOError' function establishes a handler that receives any</span><span>
</span><span id="line-341"></span><span class="hs-comment">-- 'IOError' raised in the action protected by 'catchIOError'.</span><span>
</span><span id="line-342"></span><span class="hs-comment">-- An 'IOError' is caught by</span><span>
</span><span id="line-343"></span><span class="hs-comment">-- the most recent handler established by one of the exception handling</span><span>
</span><span id="line-344"></span><span class="hs-comment">-- functions.  These handlers are</span><span>
</span><span id="line-345"></span><span class="hs-comment">-- not selective: all 'IOError's are caught.  Exception propagation</span><span>
</span><span id="line-346"></span><span class="hs-comment">-- must be explicitly provided in a handler by re-raising any unwanted</span><span>
</span><span id="line-347"></span><span class="hs-comment">-- exceptions.  For example, in</span><span>
</span><span id="line-348"></span><span class="hs-comment">--</span><span>
</span><span id="line-349"></span><span class="hs-comment">-- &gt; f = catchIOError g (\e -&gt; if IO.isEOFError e then return [] else ioError e)</span><span>
</span><span id="line-350"></span><span class="hs-comment">--</span><span>
</span><span id="line-351"></span><span class="hs-comment">-- the function @f@ returns @[]@ when an end-of-file exception</span><span>
</span><span id="line-352"></span><span class="hs-comment">-- (cf. 'System.IO.Error.isEOFError') occurs in @g@; otherwise, the</span><span>
</span><span id="line-353"></span><span class="hs-comment">-- exception is propagated to the next outer handler.</span><span>
</span><span id="line-354"></span><span class="hs-comment">--</span><span>
</span><span id="line-355"></span><span class="hs-comment">-- When an exception propagates outside the main program, the Haskell</span><span>
</span><span id="line-356"></span><span class="hs-comment">-- system prints the associated 'IOError' value and exits the program.</span><span>
</span><span id="line-357"></span><span class="hs-comment">--</span><span>
</span><span id="line-358"></span><span class="hs-comment">-- Non-I\/O exceptions are not caught by this variant; to catch all</span><span>
</span><span id="line-359"></span><span class="hs-comment">-- exceptions, use 'Control.Exception.catch' from &quot;Control.Exception&quot;.</span><span>
</span><span id="line-360"></span><span class="hs-comment">--</span><span>
</span><span id="line-361"></span><span class="hs-comment">-- @since 4.4.0.0</span><span>
</span><span id="line-362"></span><span id="local-6989586621679543659"><span class="annot"><a href="System.IO.Error.html#catchIOError"><span class="hs-identifier hs-type">catchIOError</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679543659"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.IO.Exception.html#IOError"><span class="hs-identifier hs-type">IOError</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679543659"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#IO"><span class="hs-identifier hs-type">IO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679543659"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-363"></span><span id="catchIOError"><span class="annot"><span class="annottext">catchIOError :: forall a. IO a -&gt; (IOError -&gt; IO a) -&gt; IO a
</span><a href="System.IO.Error.html#catchIOError"><span class="hs-identifier hs-var hs-var">catchIOError</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IO a -&gt; (IOError -&gt; IO a) -&gt; IO a
forall e a. Exception e =&gt; IO a -&gt; (e -&gt; IO a) -&gt; IO a
</span><a href="GHC.IO.html#catch"><span class="hs-identifier hs-var">catch</span></a></span><span>
</span><span id="line-364"></span></pre></body></html>